#ifndef MAINDLG_H
#define MAINDLG_H

#include <QWidget>
#include <QDialog>
#include <QMenuBar>

namespace Ui {
    class MainDlg;
}

class QMenu;
class QSettings;
class QListWidgetItem;
class GlobalConfig;
class TaskManager;
class MainDlg : public QDialog {
    Q_OBJECT
public:
    MainDlg(QDialog *parent = 0);
    ~MainDlg();

public slots:
    void newAccount();
    void doTasks();
    void showConfigs();
    void lstAccountChanged(QListWidgetItem*);
    void updateLstAccount();
    void showGlobalSettings();
    void showProxyDlg();

    void showLstTaskMenu();
    void removeTask();
    void suspendTask();
    void continueTask();

    void closeDlg();
protected:
    void changeEvent(QEvent *e);
    virtual void closeEvent(QCloseEvent*);

private:
    bool canClose;
    Ui::MainDlg *ui;
    QSettings* settings;
};

void postInfo(QString info);
void updateLstTask();
#endif // MAINDLG_H
